package org.giovanolli.mumi.entities;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * The Class PatientEvaluation.
 */
@Entity
@Table(name = "patient_evaluation")
public class PatientEvaluation extends IdentificableEntity {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 8916807266689886833L;

	/** The from. */
	@Column(name = "from_date")
	private Date fromDate;

	/** The to. */
	@Column(name = "to_date")
	private Date toDate;

	/** The patient. */
	@ManyToOne
	@JoinColumn(name = "patient_id")
	private Patient patient;

	/** The specialist. */
	@ManyToOne
	@JoinColumn(name = "specialist_id")
	private Specialist specialist;

	/** The evaluation. */
	@Column(name = "evaluation", length = 100000)
	private String evaluation;

	/** The observation. */
	@OneToMany(cascade = CascadeType.ALL)
	private List<GeneralObservation> observations = new ArrayList<GeneralObservation>();

	/**
	 * Gets the evaluation.
	 * 
	 * @return the evaluation
	 */
	public String getEvaluation() {
		return evaluation;
	}

	/**
	 * Gets the from date.
	 * 
	 * @return the from date
	 */
	public Date getFromDate() {
		return fromDate;
	}

	/**
	 * Gets the observations.
	 * 
	 * @return the observations
	 */
	public List<GeneralObservation> getObservations() {
		return observations;
	}

	/**
	 * Gets the patient.
	 * 
	 * @return the patient
	 */
	public Patient getPatient() {
		return patient;
	}

	/**
	 * Gets the specialist.
	 * 
	 * @return the specialist
	 */
	public Specialist getSpecialist() {
		return specialist;
	}

	/**
	 * Gets the to date.
	 * 
	 * @return the to date
	 */
	public Date getToDate() {
		return toDate;
	}

	/**
	 * Sets the evaluation.
	 * 
	 * @param evaluation
	 *            the new evaluation
	 */
	public void setEvaluation(String evaluation) {
		this.evaluation = evaluation;
	}

	/**
	 * Sets the from date.
	 * 
	 * @param fromDate
	 *            the new from date
	 */
	public void setFromDate(Date fromDate) {
		this.fromDate = fromDate;
	}

	/**
	 * Sets the observations.
	 * 
	 * @param observations
	 *            the new observations
	 */
	public void setObservations(List<GeneralObservation> observations) {
		this.observations = observations;
	}

	/**
	 * Sets the patient.
	 * 
	 * @param patient
	 *            the new patient
	 */
	public void setPatient(Patient patient) {
		this.patient = patient;
	}

	/**
	 * Sets the specialist.
	 * 
	 * @param specialist
	 *            the new specialist
	 */
	public void setSpecialist(Specialist specialist) {
		this.specialist = specialist;
	}

	/**
	 * Sets the to date.
	 * 
	 * @param toDate
	 *            the new to date
	 */
	public void setToDate(Date toDate) {
		this.toDate = toDate;
	}

}
